﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using Chronos;

public enum AllName
{
    Player,
    AI,
    Slime,
}
[Serializable]
public class Name
{
    public int name;
    public bool isFriendly;
}

//组件参数
[Serializable]
public class BasicComponent
{
    
    public Animator animator;
    public Transform transform;
}

//移动参数
[Serializable]
public class Movement
{
    public Vector2 moveDir;
    public float moveSpeed;
}
//目标参数
[Serializable]
public class Aim
{
    public Transform target;
    public Vector2 aimDir;
    public float distance;
}
//生命参数
[Serializable]
public class Health
{
    public float maxHealth;
    private float CurrentHealth;
    public float currentHealth
    {
        set
        {
            if (value < maxHealth)
            {
                CurrentHealth = value;
            }
            else
            {
                CurrentHealth = maxHealth;
            }
        }
        get
        {
            return CurrentHealth;
        }
    }
    public float sheild;
}
[Serializable]
public class Mana
{
    public float maxMana;
    public float CurrentMana;
    public float currentMana
    {
        set
        {
            if(value < maxMana && value > 0)
            {
                CurrentMana = value;
            }else
            if(value >= maxMana)
            {
                CurrentMana = maxMana;
            }else
            if(value <= 0)
            {
                CurrentMana = 0;
            }
        }
        get
        {
            return CurrentMana;
        }
    }
    public float manaRecoverySpeed;
}
//角色属性点
[Serializable]
public class StatusPoint
{
    public float attack;
    public float defence;
}



[Serializable]
public class MonoParameter 
{

    public Name NameData = new Name();
    public BasicComponent ComponentData = new BasicComponent();
    public Movement MovementData = new Movement();
    public Aim AimData = new Aim();
    public Health HealthData = new Health();
    public StatusPoint StatusPointData = new StatusPoint();
    public Mana ManaData = new Mana();

}
